import os
from django.apps import AppConfig

class TrendConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'trend'
    verbose_name = '趋势分析'

    def ready(self):
        """应用启动时确保output目录存在"""
        output_dir = os.path.join(os.path.dirname(__file__), 'output')
        os.makedirs(output_dir, exist_ok=True) 